package com.itheima.chapter03.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class Comment {
    private Integer id;
    @NotBlank(message = "评论内容不能为空")
    private String content;
    @NotBlank(message = "作者不能为空")
    private String author;
    @NotNull(message = "归属文章不能为空")
    @Min(value = 1, message = "归属文章不存在")
    @JsonProperty("aId")
    private Integer aId;
}
